Sniffaccess requests

Working Environment requests

- set_workingenv WORKING_ENVIRONMENT
Set the SNiFF+ working environment. For PWEs, you have the option of entering the name of the owner of the PWE. If you don't enter the name of the owner, SNiFF+ will use the name of the current user. For all other working environments, the owner is "adm".

- update_private_we PROJECT [CONFIGURATION]
Updates PROJECT in the Private Working Environment to the configuration indicated by the parameter. After the update, the specified projects are reloaded. If no configuration is supplied, the default configuration of the project is taken.
Project Editor menu: Project > Update Checkmarked Projects...

- add_workingenv WORKING_ENVIRONMENT PATH [ACCESSED WORKING_ENVIRONMENT]
Creates a new working environment. An accessed base working environment can also be specified (e.g. an SOWE to be accessed by a new PWE). The working environment can only be created using this request if the user is also allowed to do so from the graphical user interface.

- delete_workingenv WORKING_ENVIRONMENT
Deletes a working environment together with all the working environments that access the specified working environment (e.g. deleting an SSWE also deletes all SOWEs and PWEs that access the specified SSWE. The working environment can only be deleted using this request if the user is also allowed to do so from the graphical user interface.
Working Environments menu: Edit > Delete...

- get_workingenv_root WORKING_ENVIRONMENT
Returns the directory specified for the working environment.

Project requests

| Note
| When you run the make_project and make_file commands via the Sniffaccess interface, you immediately receive an Ok message from Sniffaccess. However, this does not mean that the Make process is over. Basically, the SNiFF+ Shell tool cannot tell when a Make process has ended. As a result, in critical situations where you need to know exactly when the Make process is over, we suggest that you run Make via the update scripts that are supplied with your SNiFF+ installation

.

- open_project

PROJECT
["WITH_SYMBOLS" | "WITHOUT_SYMBOLS"]
["NO_CACHE" | "USE_CACHE"]
["OPEN_XREF_DB_STRATEGY (0|1|2)"]
["OPEN_XREF_DB_TIMEOUT 30"]

Open a project. The symbols argument determines whether the symbol table is loaded. Default: open with symbols.
The cache argument determines whether cached symbol information is used.
Default: cache is not used.
If database-driven cross reference system is used the following database access control strategies can be used:

- Strategy

0 : If locks preventing Write access to the cross reference database are set, abort opening the project (default).
- Strategy
1 : Save and close all open files and projects in active SNiFF+ sessions preventing Write access to the cross reference database.
- Strategy
2 : Break all locks. Not to be recommended!
Execution of the above strategies commences after the number of seconds entered after the OPEN_XREF_DB_TIMEOUT string. Default: 30 seconds.
Launch Pad menu: Project > Open Project...

- reload_project
PROJECT_NAME [WORKING_ENVIRONMENT]
Reload a project. If a working enviornment is specified, the project is opened there. Default: current working environment. Launch Pad/Project Editor menu: Project > Reload Project...

- close_project
PROJECT_NAME ["SAVE" | "DISCARD" | "ASK"]
Close a project. By default, SNiFF+ discards modifications to projects.
Launch Pad menu: Project > Close Project.

- check_obsolete_files PROJECT_NAME
Note: The PROJECT_NAME argument must be unambiguous, that is, do not use wildcards; all sub-projects will always be recursively checked.
Lists all files which are in the project directory tree, but which are not used in projects, i.e. which are not recorded in any of the PDFs in the project structure. These files are listed in the SNiFF+ Log Window. To execute this command, make sure that the project is open in SNiFF+.
Project Editor menu: Project > Check Obsolete Files...

- update_file_info
PROJECT_NAME
Update the file status of all files in all Project Editors of a project.
Project Editor menu: Project > Synchronize File Status

- force_reparse
PROJECT_NAME
Force a reparse of all files of a project.
Project Editor menu: Project > Force Reparse

- update_symtab
PROJECT_NAME
Update the symbol table of a project. This command checks for all files whether they have changed and reparses them if necessary.
Project Editor menu: Project > Load/Update Symbol Table
- generate_xref_info
PROJECT_NAME
Generate and dump (cache) the cross reference information of a project

- add_subproject
PROJECT_NAME PROJECT
Add a subproject to a project. Specify the path to the PDF.
Project Editor menu: Project > Add Subproject...

- remove_subproject
PROJECT_NAME PROJECT_NAME
Remove a subproject from a project.
Project Editor menu: Project > Remove Subproject

- add_file PROJECT_NAME FILE
Add a file to a project. The project description file is saved immediately.
Project Editor menu: Project > Add/Remove Files...

- remove_file
PROJECT_NAME FILE
Remove a file from a project. The project description file is saved immediately.
Project Editor menu: Project > Add/Remove Files...

- make_project
PROJECT_NAME [TARGET_NAME]
Make the target of a project.
Project Editor/Source Editor/Shell menu: Target > Make Project

- make_file
PROJECT_NAME FILE
Make a file of a project.
Project Editor/Source Editor/Shell menu: Target > Make File

- update_makefiles
PROJECT_NAME
Update (generate) the make support files of a project.
Project Editor/Source Editor/Shell menu: Target > Update Makefiles...

- get_attributes PROJECT_NAME ATTRIBUTE
Gets Project Attributes of one or more projects. ATTRIBUTE is specified using the name of the Project Attribute in the PDF.
Project Editor menu: Project > Attributes...

- set_attributes
PROJECT_NAME ATTRIBUTE VALUE
Sets Project Attributes of one or more projects. ATTRIBUTE is specified using the name of the ProjectAttribute in the PDF.
Project Editor menu: Project > Attributes...

- list_dirs PROJECT_NAME
Lists all source directories in PROJECT_NAME and its sub-projects (private and shared WEs) - one directory per line. List can be used e.g. as source path for a debugger.

Configuration management requests

- update_cms_info

PROJECT_NAME
Update and dump (cache) the configuration information of a project. Configuration Manager menu: Configuration > Update Information

- checkout_config PROJECT_NAME [CONFIGURATION]
Check out all files belonging to a configuration of a project. Note: Before issuing this command, issue the update_cms_info command.
If no configuration is supplied, the HEAD configuration is taken. The checked-out files are read-only and the repository is not locked.
Configuration Manager menu: Configuration > Check Out...

- delete_config
PROJECT_NAME CONFIGURATION
Deletes a project configuration name.
Configuration Manager menu: Configuration > Delete Configuration Name...

- freeze_config
PROJECT_NAME CONFIGURATION ["OVERRIDE"]
Freezes the default configuration of a project (as defined in the working environment). The OVERRIDE argument allows a previouse configuration name to be associated with the configuration to be frozen.
Configuration Manager menu: Configuration > Freeze Default Configuration...

- rename_config
PROJECT_NAME CONFIGURATION_OLD CONFIGURATION_NEW
Renames a project configuration.
Configuration Manager menu: Configuration > Rename Configuration
File requests

- show_difference PROJECT_NAME FILE VERSION1 VERSION2 [VERSION3]
Starts a diff on

FILE . VERSION1 is the left version, VERSION2 is the right version, and VERSION3 is optional -- if present a 3-way diff is started. Version can be either a version label (e.g. HEAD) or a version number (e.g. 1.1.2).
* Menu: File > Show Differences...

- edit_file
PROJECT_NAME FILE [LINE_NUMBER]
Load a file into a reusable Source Editor. If necessary, open a new Source Editor. If a line number is supplied, select that line and position to it.
Project Editor:double-click on file.

- save_file
PROJECT_NAME FILE
Save a file. The file is only saved if it is loaded in a Source Editor and modified.
* Menu: File > Save.

- file_changed
PROJECT_NAME FILE
Tell SNiFF+ that a file has changed. SNiFF+ reparses the file and updates the symbol information.

- checkout_file
PROJECT_NAME FILE ("EXCLUSIVE" | "CONCURRENT" | "NOLOCK")
[VERSION_OR_SYMBOL BRANCH_FLAG]
Check out a file to the Private Working Environment. BRANCH_FLAG can be 'T' or 'F'. If BRANCH_FLAG is set to 'T', a branch is created from the specified version. Default: version HEAD and no branching ( BRANCH_FLAG is 'F').
* Menu: File > Check Out...

| Note
| The value of BRANCH_FLAG depends on your underlying version control system: checkout_file request T for SCCS, F for RCS checkin_file request: F for SCCS, T for RCS

- checkin_file
PROJECT_NAME FILE ("UNLOCK" | "LOCK") [VERSION_OR_SYMBOL CHANGE_SET COMMENT BRANCH_FLAG BRANCH_NAME]
Check in a file. BRANCH_FLAG can be 'T' or 'F'. If BRANCH_FLAG is set to 'T', a branch is created from the specified version. Default: HEAD version, no change set, no comment, no branching.
* Menu: File > Check In...

- lock_file
PROJECT_NAME FILE ("EXCLUSIVE" | "CONCURRENT") [VERSION_OR_SYMBOL]
Lock a file. Default version: HEAD .
Project Editor/Source Editor/DiffMerge menu: File > Lock...

- unlock_file
PROJECT_NAME FILE [VERSION_OR_SYMBOL]
Unlock a file. Default version: HEAD .
* Menu: File > Unlock....
Symbol requests

- browse_class

PROJECT_NAME CLASS
Load a class into the Class Browser.
* Menu: Class > Browse Class class.

- hierarchy
PROJECT_NAME CLASS ("RESTRICTED" | "FULL")
Load a class into the Hierarchy Browser and select it. Default mode: FULL .
* Menu: Class > Show class in Hierarchy.

- find_symbol
PROJECT_NAME SYMBOL
Find a symbol in the Symbol Browser.
* Menu: Info > Find Symbols Matching selection.

- edit_symbol
PROJECT_NAME SYMBOL [TYPE_SPEC FILE]
Load a symbol into the Source Editor. If the symbol is unambiguous, TYPE_SPEC and FILE can be omitted. If the symbol is ambiguous, the first symbol found is taken.
Source Editor menu:Show > Symbol(s) symbol.

- retrieve
PROJECT_NAME STRING ["CASE_SENSITIVE" "WHOLE_WORD"]
Retrieve a string in the Retriever. Default: retrieve case-insensitive and also part of a word. * Menu: Info > Retrieve string.

- documentation
PROJECT_NAME SYMBOL [TYPE_SPEC FILE]
Load the documentation of a symbol into the Documentation Editor. If the symbol is unambiguous, TYPE_SPEC and FILE can be omitted. If the symbol is ambiguous, the first symbol found is taken.
*Menu: Info > Show documentation of symbol

Data query requests

- list_projects
List all open projects (including complete path) to

stdout .

- list_classes
PROJECT_NAME
List all classes of a project to stdout.

- list_files
PROJECT_NAME ["FULLPATH"]
List all open files [including complete path] to stdout .

General requests

- set_timeout

SECONDS
Set the timeout for reply waits between SNiFF+ and Sniffaccess.

- iconify
[PROJECT_NAME]
Iconify the windows of a project. If PROJECT_NAME is omitted, all open projects and SNiFF+ itself are iconified.

- normalize
[PROJECT_NAME]
Normalize (de-iconify) the windows of a project. If project is omitted, all open projects and SNiFF+ itself are normalized.

- wait
SECONDS
Wait for the specified time and then process the next request; SNiFF+ continues processing in the meantime.

- quit
["SAVE" | "DISCARD" | "ASK"]
Quit SNiFF+ and Sniffaccess. By default, SNiFF+ discards modifications to files and projects.
- exit
Quit only Sniffaccess, but don't quit SNiFF+.

Request replies
SNiFF+ replies to each request with a message like this:

sniff: OKAY
or
sniff: ERROR: filebrowser.proj: no such project
The format of the reply is:
Requ estReply = SimpleOK | DetailedReply.
SimpleOK = "sniff: OKAY".
Detail edReply = "sniff: " ("OK" | "WARNING" | "ERROR")[": " MessageText].
MessageText = string.